package com.study.designPattern.create.prototype;

/**
 * @author ysy
 * @version 1.0
 * @Title: CloneableCar
 * @Note <b>ProjectName:</b> Pre-research
 * <br><b>PackageName:</b> com.study.designPattern.create.prototype
 * <br><b>ClassName:</b>
 * <br><b>Date:</b>

 */
public abstract class CloneableCar implements Cloneable{

    protected String type;
    private String brandName;
    private String seriesName;
    private String id;
    public String getBrandName() {
        return brandName;
    }
    public void setBrandName(String brandName) {
        this.brandName = brandName;
    }
    public String getSeriesName() {
        return seriesName;
    }
    public String getId() {
        return id;
    }
    public void setId(String id) {
        this.id = id;
    }
    public void setSeriesName(String seriesName) {
        this.seriesName = seriesName;
    }

    // 重写clone方法
    @Override
    protected Object clone() throws CloneNotSupportedException {
        Object clone = null;
        try {
            clone = super.clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        return clone;
    }
    // 业务方法
    abstract void run();
}
